package controller;

import entity.Goods;
import entity.User;
import service.GoodsService;
import service.Impl.GoodsServiceImpl;

import java.util.List;

public class GoodsController {
    GoodsService goodsService=new GoodsServiceImpl();
    public boolean insertGoodsController(Goods goods){
        return goodsService.insertGoodsService(goods);
    }
    public boolean deleteGoodsByGoodsIdController(String goodsId){
        return goodsService.deleteGoodsByGoodsIdService(goodsId);
    }
    public boolean updateGoodsByIdService(String goodsId,Goods goods){
        return goodsService.updateGoodsByIdService(goodsId,goods);
    }
    public boolean buyGoodsByGoodsNameService(String goodsName,Goods goods){
        return goodsService.buyGoodsByGoodsNameService(goodsName,goods);
    }
    public boolean returnGoodsByGoodsNameService(String goodsName,Goods goods){
        return goodsService.returnGoodsByGoodsNameService(goodsName,goods);
    }
    public boolean changeGoodsByGoodsNameService(String goodsName,Goods goods){
        return goodsService.changeGoodsByGoodsNameService(goodsName,goods);
    }
    public Goods selectGoodsByNameService(String goodsName){
        return goodsService.selectGoodsByGoodsNameService(goodsName);
    }
    public List<Goods> selectGoodsByIdController(String goodsId){
        return  goodsService.selectGoodsByIdService(goodsId);
    }
    public List<Goods> selectAllGoodsService(){
        return goodsService.selectAllGoodsService();
    }
}
